﻿using System.Configuration;

namespace LeastPrivilege.CustomBasicAuthentication.Management
{
	public class UnregisteredAuthenticationSection : ConfigurationSection
	{
		public static string SectionName = "leastPrivilege/basicAuth";

		[ConfigurationProperty("enabled")]
		public bool Enabled
		{
			get { return (bool)base["enabled"]; }
			set { base["enabled"] = value; }
		}

		[ConfigurationProperty("realm")]
		public string Realm
		{
			get { return (string)base["realm"]; }
			set { base["realm"] = value; }
		}

		[ConfigurationProperty("providerName")]
		public string ProviderName
		{
			get { return (string)base["providerName"]; }
			set { base["providerName"] = value; }
		}

		[ConfigurationProperty("cachingEnabled")]
		public bool CachingEnabled
		{
			get { return (bool)base["cachingEnabled"]; }
			set { base["cachingEnabled"] = value; }
		}

		[ConfigurationProperty("cachingDuration")]
		public int CachingDuration
		{
			get { return (int)base["cachingDuration"]; }
			set { base["cachingDuration"] = value; }
		}

		[ConfigurationProperty("requireSSL")]
		public bool RequireSSL
		{
			get { return (bool)base["requireSSL"]; }
			set { base["requireSSL"] = value; }
		}
	}
}